import { RouteRecordRaw } from 'vue-router';
import { BasicRouter } from '@/router/types';

export default [
  //404 not found page
  {
    path: '/:path(.*)*',
    name: BasicRouter.NOTFOUND,
    component: () => import('@/views/NotFound.vue'),
    meta: {
      title: '404',
    },
    children: [
      {
        path: '/:path(.*)*',
        name: BasicRouter.NOTFOUND,
        component: () => import('@/views/NotFound.vue'),
        meta: {
          title: '404',
        },
      },
    ],
  },
  {
    path: '/redirect',
    component: () => import('@/views/DataShow.vue'),
    name: 'RedirectTo',
    meta: {
      title: '',
    },
    children: [
      {
        path: '/redirect/:path(.*)',
        name: BasicRouter.REDIRECT,
        // @ts-ignore
        component: () => import('@/views/Redirect.vue'),
        meta: {
          title: '',
        },
      },
    ],
  },
] as RouteRecordRaw[];
